import java.util.Scanner;

/**
 * @Auther: zhaozs
 * @Date: 2021/4/14 23:32
 * @Description:
 */
public class Test1 {
    public static void main(String[] args) {
        //第一次 输入起始高度，int型
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            double sum = 0;
            double temp = n;
            for (int i = 0; i < 5; i++) {
                sum += temp * 2;
                temp = temp / 2;
            }
            //第一次按它先弹上来再掉下去算的，要减掉第一次弹上来的路程
            sum -= n;
            System.out.printf("%.6f\n", sum);
            System.out.printf("%.6f\n", temp);
            System.out.println("测试");
        }
    }
}
